#ifndef CAMERA_H
#define CAMERA_H

#include <QObject>
#include <QVector3D>
class Camera : public QObject
{
  Q_OBJECT
  public:
    Camera();
    Camera(const QVector3D& eye,
           const QVector3D& center,
           const QVector3D& up = QVector3D(0,1,0));

    void look() const;
    float distance() const;
    const QVector3D& center() const;
    const QVector3D& eye() const;
    void move(float xoffset, float yoffset, float zoffset);
    void pan(float angle); // rotate about y
    void tilt(float angle); // rotate about x
    void spin(float angle); // rotate about z

    void setCenter(const QVector3D& center);
    void setEye(const QVector3D& eye);
    void zoom(float distance);

  protected:
    QVector3D mEye, mCenter, mUp;
};

#endif // CAMERA_H
